package hhh.com.dianming;


import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.support.annotation.Nullable;

public class MySqlite extends SQLiteOpenHelper{
    private Context context;
    public MySqlite(@Nullable Context context) {
        super(context, "ming.db", null, 1);
        this.context = context;
    }
    @Override
    public void onCreate(SQLiteDatabase sqLiteDatabase) {
        String sql="create table user(id integer primary key autoincrement,username varchar(18),password varchar(18))";
        sqLiteDatabase.execSQL(sql);

        sqLiteDatabase.execSQL("create table mings("+
                "id INTEGER PRIMARY KEY AUTOINCREMENT," +
                "user text," +
                "name text);");
    }
    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {
    }
}
